
//
//  SixCoCell.m
//  房源、商铺、写字楼详情页
//
//  Created by MB__Lee on 2018/5/23.
//  Copyright © 2018年 MB__Lee. All rights reserved.
//

#import "SixCoCell.h"

@interface SixCoCell()

@property (weak, nonatomic) IBOutlet UIImageView *imgV;
@property (weak, nonatomic) IBOutlet UILabel *LabelName;

@end



@implementation SixCoCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(void)setCoModel:(coCellModel *)coModel{
    _coModel = coModel;
    
    
    if (coModel.isSlected) {
        self.imgV.image = [UIImage imageNamed:coModel.selected];
        self.LabelName.text = coModel.name;
    }else{
        self.imgV.image = [UIImage imageNamed:coModel.noSelected];
        self.LabelName.attributedText =[self getAttributedString:coModel.name];
    }
    
    
}
-(NSAttributedString *)getAttributedString:(NSString *)normalString{
    NSDictionary *dic  = @{NSFontAttributeName:MBFont(13),NSForegroundColorAttributeName:MBLineColor,NSStrikethroughStyleAttributeName:@(NSUnderlineStyleThick)};
    
    NSMutableAttributedString *mutAttributedString  =[[NSMutableAttributedString alloc] initWithString:normalString attributes:dic];
    
    return  mutAttributedString;
}




@end
